﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleFactoryPattern
{
    class OperateFactory
    {
        public static Operate CreateOperate(string op)
        {
            Operate operate = null;
            switch (op)
            {
                case "+":
                    operate = new OperateAdd();
                    break;

                case "-":
                    operate = new OperateSub();
                    break;

            }
            return operate;
        }
    }
}
